package com.aforce3.trailertracer.scenes;

import javax.vecmath.Color3f;
import javax.vecmath.Point3d;

import com.aforce3.trailertracer.Ray;

public class PointLight extends Sphere implements LightSource
{
	float intensity;
	public PointLight(Point3d center, float radius, float intensity)
	{
		super(center, radius);
		this.intensity = intensity;
	}
	
	public PointLight(Point3d center, float radius, Color3f emmisiveColor, float intensity)
	{
		super(center, radius);
		this.intensity = intensity;
		this.material.setEmissiveColor(emmisiveColor);
	}
	
	public Color3f getColor(Ray ray, Scene s){
		//System.out.println("got color" + material.getEmissiveColor());
		return new Color3f(material.getEmissiveColor());
	}
	
	public boolean isLight(){
		return true;
	}

	public float getIntensity()
	{
		return intensity;
	}

	public float getIntensity(Point3d point)
	{
		// TODO Auto-generated method stub
		return 0;
	}
}
